package com.zpl.common.support.hook;

import lombok.extern.slf4j.Slf4j;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/9/8 12:05
 */
@Slf4j
public abstract class AbstractShutdownHook implements RpcShutdownHook {

    @Override
    public void hook() {
        log.info("[Shutdown Hook] start");
        this.doHook();
        log.info("[shutdown Hook] end");
    }

    /**
     * 执行 hook 操作
     */
    protected abstract void doHook();
}
